<!DOCTYPE>
<html>
<head>
    <title>外边距合并</title>
    <style>
        .father{
            height: 200px;
            width: 200px;
            margin-top: 20px;
            background: coral;
        }

        .son{
            height: 100;
            width: 100px;
            margin-top: 10px;
            background: cornflowerblue;
        }
        .father2{
            height: 200px;
            width: 200px;
            margin-top: 20px;
            background: coral;
            /* border: 1px solid transparent; */
            /* padding: 1; */
            overflow: hidden;
        }
    </style>
</head>
<body>
    <div class="father">
        <div class="son"></div>
    </div>
    <div class="father2">
        <div class="son"></div>
    </div>
</body>
</html>